// 查询列表接口
const getRolePage = (params) => {
  return $axios({
    url: '/role/page',
    method: 'get',
    params
  })
}


// 删除当前列的接口
const deleRole = (id) => {
  return $axios({
    url: '/role',
    method: 'delete',
    params: { id }
  })
}

// 修改接口
const editRole = (params) => {
  return $axios({
    url: '/role',
    method: 'put',
    data: { ...params }
  })
}

// 新增接口
const addRole = (params) => {
  return $axios({
    url: '/role',
    method: 'post',
    data: { ...params }
  })
}

const queryRoleById = (id) => {
  return $axios({
    url: `/role/${id}`,
    method: 'get'
  })
}

const setRoleModules = (parms) => {
  return $axios({
    url: `/role/update`,
    method: 'put',
    data: { ...parms }
  })
}

const getAuthorIdsList = () => {
  return $axios({
    url: `/role/author`,
    method: 'get'
  })
}